Skip to content

Fix PHPCS errors in Behat test files - #1126

Merged
swissspidy merged 2 commits into
mainfrom
fix/tests-lint
Sep 1, 2026
Merged

Fix PHPCS errors in Behat test files#1126
swissspidy merged 2 commits into
mainfrom
fix/tests-lint

Conversation

@swissspidy

@swissspidy swissspidy commented Sep 1, 2026

Copy link
Copy Markdown
Member

Summary by CodeRabbit

  • Tests
    • Updated end-to-end test fixtures to use consistent PHP coding standards.
    • Standardized string quoting, indentation, multi-line command registrations, and directory path handling.
    • Preserved all existing scenarios, assertions, expected outputs, and test behavior.

Copilot AI lite review requested due to automatic review settings September 1, 2026 10:34
@swissspidy
swissspidy requested a review from a team as a code owner September 1, 2026 10:34
@swissspidy swissspidy added this to the 3.0.0 milestone Sep 1, 2026
@coderabbitai

coderabbitai Bot commented Sep 1, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

Next included review available in 54 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Team

Run ID: ba5533bc-7fc8-4d7d-b78a-47984f760855

📥 Commits

Reviewing files that changed from the base of the PR and between 606cb4e and 125053f.

📒 Files selected for processing (1)
  • features/command.feature

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Team

Run ID: cac0b103-91d3-4c38-b551-2bcc084f297a

📥 Commits

Reviewing files that changed from the base of the PR and between 7dfcd07 and 606cb4e.

📒 Files selected for processing (5)
  • features/bootstrap.feature
  • features/command.feature
  • features/config.feature
  • features/package.feature
  • features/requests.feature

Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review.


📝 Walkthrough

Walkthrough

Changes

The Behat PHP fixtures now use updated __DIR__ path syntax, WP-CLI coding-standard indentation, multiline calls, and single-quoted strings. Scenario behavior and assertions remain unchanged.

Fixture formatting

Layer / File(s) Summary
Path syntax updates
features/bootstrap.feature, features/config.feature
Bootstrap and configuration fixtures use __DIR__ and equivalent PHP syntax.
Command fixture formatting
features/command.feature
Command, hook, closure, class, and method fixtures were reformatted without logic changes.
Package and Requests fixture formatting
features/package.feature, features/requests.feature
Fixtures use multiline command calls and single-quoted PHP strings.

Estimated code review effort: 2 (Simple) | ~10 minutes

Merge Risk: ⚪ Minimal · up to 606cb

This PR updates Behat test files to address PHPCS errors without introducing an actionable production or user-facing risk; no merge-blocking risk remains beyond normal checks and review.

Suggested reviewers: schlessera

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the changes, which fix PHPCS-related formatting issues in Behat test files.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0…
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage

Explanation

No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0 files. (5 skipped: 5 unsupported.)

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/tests-lint

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates Behat .feature files to address coding-style (PHPCS) issues in embedded PHP snippets, aligning fixtures with the project’s formatting expectations.

Changes:

  • Standardizes string quoting and spacing in embedded PHP examples (e.g., single quotes, function () spacing).
  • Re-formats multi-line WP_CLI::add_command() / hook registrations for readability and style compliance.
  • Modernizes a few path/require patterns (e.g., __DIR__, brace usage in conditionals) to satisfy style rules.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
features/requests.feature Normalizes quoting in http_request() examples and require __DIR__ ... fixture.
features/package.feature Re-formats inline package command PHP fixtures for PHPCS compliance.
features/config.feature Adjusts ABSPATH definition and require_once style in the wp-config fixture.
features/command.feature Broad re-formatting of embedded command-registration fixtures; one indentation inconsistency remains.
features/bootstrap.feature Updates embedded bootstrap override fixtures (indentation, __DIR__, string quoting).

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread features/command.feature Outdated
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@swissspidy
swissspidy merged commit cda142b into main Sep 1, 2026
53 checks passed
@swissspidy
swissspidy deleted the fix/tests-lint branch September 1, 2026 10:50
@codecov

codecov Bot commented Sep 1, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

scope:testing Related to testing

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants